import request from '@/utils/request'

// 查询点餐信息暂存列表
export function listOrdering(query) {
  return request({
    url: '/project/wtc/ordering/list',
    method: 'get',
    params: query
  })
}

// 查询点餐信息暂存详细
export function getOrdering(ID) {
  return request({
    url: '/project/wtc/ordering/' + ID,
    method: 'get'
  })
}

// 新增点餐信息暂存
export function addOrdering(data) {
  return request({
    url: '/project/wtc/ordering',
    method: 'post',
    data: data
  })
}

// 修改点餐信息暂存
export function updateOrdering(data) {
  return request({
    url: '/project/wtc/ordering',
    method: 'put',
    data: data
  })
}

// 删除点餐信息暂存
export function delOrdering(ID) {
  return request({
    url: '/project/wtc/ordering/' + ID,
    method: 'delete'
  })
}

// 生成订单号
export function createOrderId() {
  return request({
    url: '/project/wtc/ordering/orderId',
    method: 'get'
  })
}
